﻿namespace DailyFx.UI
{
	/// <summary>
	///		main window for the app .
	/// </summary>
	public interface IWindow : IUIControl, IFlyoutManager
	{ 
	}

	public class Window : UIControl, IWindow
	{
		private readonly IBindableCollection<IFlyout> _flyouts = new BindableCollection<IFlyout>();


		/// <summary>
		///		the window's title ...	
		/// </summary>
		public string Title
		{
			get
			{
				return base.DisplayText;
			}
			set
			{
				base.DisplayText = value;
				this.RaisePropertyChanged( () => Title );
			}
		}


		public IBindableCollection<IFlyout> Flyouts
		{
			get 
			{ 
				return this._flyouts; 
			}
		}

		public void AddFlyout ( IFlyout flyout )
		{
			this._flyouts.Add( flyout );
		}

		public IFlyout GetFlyout ( int index )
		{
			return this._flyouts[ index ];
		}

	}
}